//
//	ZcoModelUrl.m
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport



#import "ZcoModelUrl.h"

NSString *const kZcoModelUrlLocalUrl = @"localUrl";
NSString *const kZcoModelUrlPrivateUrl = @"privateUrl";
NSString *const kZcoModelUrlPublicUrl = @"publicUrl";

@interface ZcoModelUrl ()
@end
@implementation ZcoModelUrl




/**
 * Instantiate the instance using the passed dictionary values to set the properties values
 */

-(instancetype)initWithDictionary:(NSDictionary *)dictionary
{
	self = [super init];
	if(![dictionary[kZcoModelUrlLocalUrl] isKindOfClass:[NSNull class]]){
		self.localUrl = dictionary[kZcoModelUrlLocalUrl];
	}	
	if(![dictionary[kZcoModelUrlPrivateUrl] isKindOfClass:[NSNull class]]){
		self.privateUrl = dictionary[kZcoModelUrlPrivateUrl];
	}	
	if(![dictionary[kZcoModelUrlPublicUrl] isKindOfClass:[NSNull class]]){
		self.publicUrl = dictionary[kZcoModelUrlPublicUrl];
	}	
	return self;
}


/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
-(NSDictionary *)toDictionary
{
	NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
	if(self.localUrl != nil){
		dictionary[kZcoModelUrlLocalUrl] = self.localUrl;
	}
	if(self.privateUrl != nil){
		dictionary[kZcoModelUrlPrivateUrl] = self.privateUrl;
	}
	if(self.publicUrl != nil){
		dictionary[kZcoModelUrlPublicUrl] = self.publicUrl;
	}
	return dictionary;

}

/**
 * Implementation of NSCoding encoding method
 */
/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
- (void)encodeWithCoder:(NSCoder *)aCoder
{
	if(self.localUrl != nil){
		[aCoder encodeObject:self.localUrl forKey:kZcoModelUrlLocalUrl];
	}
	if(self.privateUrl != nil){
		[aCoder encodeObject:self.privateUrl forKey:kZcoModelUrlPrivateUrl];
	}
	if(self.publicUrl != nil){
		[aCoder encodeObject:self.publicUrl forKey:kZcoModelUrlPublicUrl];
	}

}

/**
 * Implementation of NSCoding initWithCoder: method
 */
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
	self = [super init];
	self.localUrl = [aDecoder decodeObjectForKey:kZcoModelUrlLocalUrl];
	self.privateUrl = [aDecoder decodeObjectForKey:kZcoModelUrlPrivateUrl];
	self.publicUrl = [aDecoder decodeObjectForKey:kZcoModelUrlPublicUrl];
	return self;

}

/**
 * Implementation of NSCopying copyWithZone: method
 */
- (instancetype)copyWithZone:(NSZone *)zone
{
	ZcoModelUrl *copy = [ZcoModelUrl new];

	copy.localUrl = [self.localUrl copy];
	copy.privateUrl = [self.privateUrl copy];
	copy.publicUrl = [self.publicUrl copy];

	return copy;
}
@end